package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MicrobialBiomassMapper;
import com.ruoyi.system.domain.MicrobialBiomass;
import com.ruoyi.system.service.IMicrobialBiomassService;
import com.ruoyi.common.core.text.Convert;

/**
 * 微生物生物量Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-20
 */
@Service
public class MicrobialBiomassServiceImpl implements IMicrobialBiomassService 
{
    @Autowired
    private MicrobialBiomassMapper microbialBiomassMapper;

    /**
     * 查询微生物生物量
     * 
     * @param id 微生物生物量主键
     * @return 微生物生物量
     */
    @Override
    public MicrobialBiomass selectMicrobialBiomassById(Long id)
    {
        return microbialBiomassMapper.selectMicrobialBiomassById(id);
    }

    /**
     * 查询微生物生物量列表
     * 
     * @param microbialBiomass 微生物生物量
     * @return 微生物生物量
     */
    @Override
    public List<MicrobialBiomass> selectMicrobialBiomassList(MicrobialBiomass microbialBiomass)
    {
        return microbialBiomassMapper.selectMicrobialBiomassList(microbialBiomass);
    }

    /**
     * 新增微生物生物量
     * 
     * @param microbialBiomass 微生物生物量
     * @return 结果
     */
    @Override
    public int insertMicrobialBiomass(MicrobialBiomass microbialBiomass)
    {
        return microbialBiomassMapper.insertMicrobialBiomass(microbialBiomass);
    }

    /**
     * 修改微生物生物量
     * 
     * @param microbialBiomass 微生物生物量
     * @return 结果
     */
    @Override
    public int updateMicrobialBiomass(MicrobialBiomass microbialBiomass)
    {
        return microbialBiomassMapper.updateMicrobialBiomass(microbialBiomass);
    }

    /**
     * 批量删除微生物生物量
     * 
     * @param ids 需要删除的微生物生物量主键
     * @return 结果
     */
    @Override
    public int deleteMicrobialBiomassByIds(String ids)
    {
        return microbialBiomassMapper.deleteMicrobialBiomassByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除微生物生物量信息
     * 
     * @param id 微生物生物量主键
     * @return 结果
     */
    @Override
    public int deleteMicrobialBiomassById(Long id)
    {
        return microbialBiomassMapper.deleteMicrobialBiomassById(id);
    }
}
